package com.ddwl.goods.mapper;

import com.ddwl.common.dao.mapper.TkMapper;
import com.ddwl.goods.dao.model.Academy;
import com.ddwl.goods.model.ColumnEssay;
import com.ddwl.schema.bo.goods.ColumnEssayPageBo;
import com.ddwl.schema.vo.goods.AcademyColumnEssayVo;
import com.ddwl.schema.vo.goods.AcademyVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author hemiaojun
 * @Date 2020/11/19 18:28
 */
@Repository
public interface ColumnEssayMapper extends TkMapper<ColumnEssay> {
    /**
     * 根据栏目查文章
     * @param columnId
     * @return
     */
    List<Academy> getEssayByColumnId(@Param("columnId") String columnId);

    /**
     * app获取各栏目以及栏目下文章
     * @return
     */
    List<AcademyColumnEssayVo> getAcademyColumnEssay();

    /**
     * 批量插入
     * @param columnEssays
     */
    void batchInsert(@Param("list") List<ColumnEssay> columnEssays);

    List<AcademyVo> getColumnEssayList(@Param("param") ColumnEssayPageBo param);

}
